<!--
 * @Author: your name
 * @Date: 2021-02-23 17:51:26
 * @LastEditTime: 2021-05-18 23:21:02
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \jf-h5\src\page\project-code\index.vue
-->
<template>
    <div class="project-code">
        <van-nav-bar left-text="返回" left-arrow @click-left="clickBack" />
        <mavon-editor v-show="false" />
        <img
            class="project-header"
            :src="this.IMGPATH + project_detail.img_path"
        />
        <div class="project-title">
            <p class="title">{{ project_detail.code_name }}</p>
            <p class="introduce">"清廉工程" 建设</p>
        </div>
        <div class="markdown-body" v-html="project_detail.html"></div>
    </div>
</template>
<script>
export default {
    created() {
        this.getCode();
    },
    data() {
        return {
            project_detail: {} //二维码详情
        };
    },
    methods: {
        // 返回
        clickBack() {
            this.$router.push({
                path: "/main/three-page?cid=1&table_name=gong_cheng_guan_li_son"
            });
        },
        async getCode() {
            const {
                code,
                data: { results }
            } = await this.$api.project_code.codeByid(this.$route.query);
            if (!code && results.length) {
                this.project_detail = results[0];
            }
        }
    }
};
</script>
<style lang="scss" scoped>
/deep/.project-code {
    .van-nav-bar {
        .van-nav-bar__content {
            height: 65px;
            .van-nav-bar__text {
                font-size: 30px;
            }
        }
    }
    .markdown-body {
        padding: 0 60px 100px;
        font-size: 25px;
        img {
            width: 100% !important;
        }
    }
    .project-header {
        width: 100%;
    }
    .project-title {
        width: 570px;
        height: 150px;
        border-radius: 20px;
        background-color: #3e75ec;
        margin: 30px auto;
        margin-bottom: 60px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        color: #ffffff;
        position: relative;
        z-index: 99;
        // letter-spacing: 5px;
        &::after {
            position: absolute;
            content: "";
            width: 620px;
            height: 150px;
            border: 5px solid #3e75ec;
            border-radius: 20px;
            top: 30px;
            left: -20px;
            z-index: -1;
        }
        .title {
            font-size: 40px;
            font-weight: bold;
        }
        .introduce {
            font-size: 35px;
        }
    }
}
</style>
